package com.bop.dehong.http.model;

import java.lang.reflect.Type;

import com.base.dehong.http.HttpRequest;
import com.base.dehong.http.RequestCallBack;
import com.bop.dehong.config.Config;
import com.bop.dehong.info.TransactionRecordsInfo;
import com.google.gson.reflect.TypeToken;

import android.app.Activity;

/**
 * 获取交易记录
* @author Tangwenhan
*2015年11月24日下午8:19:19
*/
public class GetTradingRecordModel extends HttpRequest<TransactionRecordsInfo>{

	public GetTradingRecordModel(Activity activity, RequestCallBack<TransactionRecordsInfo> callback) {
		super(activity, callback);
		// TODO Auto-generated constructor stub
	}
	/**
	 * 获取交易记录
	 * @param uid 
	 * @param p 页数
	 * @param listRows  每页条数
	 */
	public void doNet(String uid,String p,String listRows) {
		mPostValues.put("a", "fundlist");
		mPostValues.put("listRows",listRows);
		mPostValues.put("m", "User");
		mPostValues.put("p", p);
		mPostValues.put("uid", uid);
		requestByPost();
	}

	@Override
	public String getURL() {
		return Config.getIP() + Config.getTradingRecordInfo;
	}

	@Override
	public Type getType() {
		return new TypeToken<TransactionRecordsInfo>() {}.getType();
	}
	
	@Override
	public Class<TransactionRecordsInfo> getClazz()
	{
		// TODO Auto-generated method stub
		return TransactionRecordsInfo.class;
	}

}

